<?php
namespace app\admin\controller;

class Specificationsshoplist extends Come{
    public function specificationsshoplist(){
        // $reslist=db('goods_format_name')->alias('a')->join('goods_format_value b','a.id=b.format_id')->field('a.*,b.vals')->select();

        $reslist=db('goods_type')->alias('a')->join('goods_format_name b',' b.type_id=a.id ')->
        join('goods_format_value c',' c.format_id=b.id ')->field('a.*,b.name as shop_name,c.vals')->paginate(5);

        // $reslist=db('goods_format_value')->select();
       
        $this->assign('reslist',$reslist);
        return $this->fetch('specificationsshoplist');

    }
    // public function delete(){
    //     $delId=input('param.delId','','htmlspecialchars');
    //     $res=db('goods_format_value')->where('id',$delId)->delete();
    //     if($res>0){
    //         $this->success('删除成功!','admin/specificationsshoplist/specificationsshoplist');
    //     }else{
    //         $this->error('删除失败');
    //     }
    // }
}